home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / EModules / graphics / blitter.e next >
Encoding:
Text File  |  1997-12-03  |  8.6 KB  |  248 lines

  1. /*
  2. **  $VER: blitter.e V0.9B
  3. **
  4. **  Blitter Object Definitions.
  5. **
  6. **  (C) Copyright 1996-1997 DreamWorld Productions.
  7. **      All Rights Reserved
  8. */
  9.  
  10. OPT MODULE
  11. OPT EXPORT
  12. OPT PREPROCESS
  13.  
  14. MODULE 'dpkernel/dpkernel','graphics/pictures',
  15.        'graphics/screens','system/register'
  16.  
  17. /****************************************************************************
  18. ** Bitmap Object. 
  19. */
  20.  
  21. CONST BMPVERSION  = 1,
  22.       TAGS_BITMAP = $FFFB0000 OR ID_BITMAP
  23.  
  24. OBJECT bitmap
  25.   head[1]    :ARRAY OF head /* Standard structure header */
  26.   data       :PTR TO CHAR   /* Pointer to bitmap data area */
  27.   width      :INT           /* Width */
  28.   bytewidth  :INT           /* ByteWidth */
  29.   height     :INT           /* Height */
  30.   type       :INT           /* Screen type */
  31.   linemod    :LONG          /* Line differential */
  32.   planemod   :LONG          /* Plane differential */
  33.   parent     :PTR TO head   /* Bitmap owner */
  34.   restore    :LONG          /* Restore list for this bitmap, if any */
  35.   size       :LONG          /* Total size of the bitmap in bytes */
  36.   memtype    :LONG          /* Memory type to use in allocation */
  37.   planes     :INT           /* Amount of planes */
  38.   emp        :INT           /* Reserved */
  39.   amtcolours :LONG          /* Maximum amount of colours available */
  40. ENDOBJECT
  41.  
  42. CONST BMA_Data       = TAPTR OR 12,
  43.       BMA_Width      = TWORD OR 16,
  44.       BMA_ByteWidth  = TWORD OR 18,
  45.       BMA_Height     = TWORD OR 20,
  46.       BMA_Type       = TWORD OR 22,
  47.       BMA_LineMod    = TLONG OR 24,
  48.       BMA_PlaneMod   = TLONG OR 28,
  49.       BMA_Parent     = TAPTR OR 32,
  50.       BMA_Restore    = TAPTR OR 36,
  51.       BMA_Size       = TLONG OR 40,
  52.       BMA_MemType    = TLONG OR 44,
  53.       BMA_Planes     = TWORD OR 48,
  54.       BMA_AmtColours = TLONG OR 52
  55.  
  56. /***************************************************************************
  57. ** Restore Object.
  58. */
  59.  
  60. CONST RSTVERSION   = 1,
  61.       TAGS_RESTORE = $FFFB0000 OR ID_RESTORE
  62.  
  63. OBJECT restore
  64.   head[1] :ARRAY OF head /* Standard header */
  65.   buffers :INT           /* Amount of screen buffers */
  66.   entries :INT           /* Amount of entries */
  67.   owner   :PTR TO head   /* Owner of the restorelist, ie bitmap */
  68. ENDOBJECT
  69.  
  70. CONST RSA_Buffers = 12 OR TWORD,
  71.       RSA_Entries = 14 OR TWORD,
  72.       RSA_Owner   = 16 OR TAPTR
  73.  
  74. /**************************************************************************/
  75.  
  76. OBJECT mbentry  /* MBob Entry Structure */
  77.   xcoord :INT
  78.   ycoord :INT
  79.   frame  :INT
  80. ENDOBJECT
  81.  
  82. OBJECT framelist
  83.    gfx_xcoord :INT
  84.    gfx_ycoord :INT
  85.    msk_xcoord :INT
  86.    msk_ycoord :INT
  87. ENDOBJECT
  88.  
  89. /***************************************************************************
  90. ** Bob Object.
  91. */
  92.  
  93. CONST BOBVERSION = 1,
  94.       TAGS_BOB   = $FFFB0000 OR ID_BOB
  95.  
  96. OBJECT bob
  97.    head[1]      :ARRAY OF head    -> Standard structure header.
  98.    gfxdata      :LONG             -> Pointer to base of BOB graphics.
  99.    maskdata     :LONG             -> Pointer to base of BOB masks.
  100.    gfxcoords    :PTR TO framelist -> Pointer to frame list.
  101.    frame        :INT              -> Current frame.
  102.    srcwidth     :INT              -> Modulo (skip in source) in bytes.
  103.    width        :INT              -> Width in pixels.
  104.    bytewidth    :INT              -> Width in bytes.
  105.    xcoord       :INT              -> To X pixel.
  106.    ycoord       :INT              -> To Y pixel.
  107.    height       :INT              -> Height in pixels.
  108.    clipLX       :INT              -> Left X border in bytes (0/8)
  109.    clipTY       :INT              -> Top Y border (0)
  110.    clipRX       :INT              -> Right X border in bytes (320/8)
  111.    clipBY       :INT              -> Bottom Y border (256)
  112.    fplane       :INT              -> 1st Plane to blit to (planar only)
  113.    planes       :INT              -> Amount of planes
  114.    propheight   :INT
  115.    propwidth    :INT
  116.    buffers      :INT
  117.    planesize    :LONG             -> Size Of Plane Source (planar only)
  118.    attrib       :LONG             -> Attributes like CLIP and MASK.
  119.    srcbitmap    :PTR TO bitmap
  120.    empty        :INT
  121.    srcmaskwidth :INT
  122.    source       :PTR TO picture
  123.    directgfx    :PTR TO LONG
  124.    screen       :PTR TO screen
  125.    destbitmap   :PTR TO bitmap
  126.    maskcoords   :PTR TO framelist
  127.    directmasks  :LONG
  128.    amtframes    :INT
  129. ENDOBJECT
  130.  
  131. CONST BBA_GfxData      = 12 OR TAPTR,
  132.       BBA_MaskData     = 16 OR TAPTR,
  133.       BBA_GfxCoords    = 20 OR TAPTR,
  134.       BBA_Frame        = 24 OR TWORD,
  135.       BBA_SrcWidth     = 26 OR TWORD,
  136.       BBA_Width        = 28 OR TWORD,
  137.       BBA_ByteWidth    = 30 OR TWORD,
  138.       BBA_XCoord       = 32 OR TWORD,
  139.       BBA_YCoord       = 34 OR TWORD,
  140.       BBA_Height       = 36 OR TWORD,
  141.       BBA_ClipLX       = 38 OR TWORD,
  142.       BBA_ClipTY       = 40 OR TWORD,
  143.       BBA_ClipRX       = 42 OR TWORD,
  144.       BBA_ClipBY       = 44 OR TWORD,
  145.       BBA_FPlane       = 46 OR TWORD,
  146.       BBA_Planes       = 48 OR TWORD,
  147.       BBA_PropHeight   = 50 OR TWORD,
  148.       BBA_PropWidth    = 52 OR TWORD,
  149.       BBA_Buffers      = 54 OR TWORD,
  150.       BBA_PlaneSize    = 56 OR TLONG,
  151.       BBA_Attrib       = 60 OR TLONG,
  152.       BBA_Empty        = 64 OR TWORD,
  153.       BBA_SrcMaskWidth = 70 OR TWORD,
  154.       BBA_Source       = 72 OR TAPTR,
  155.       BBA_DirectGfx    = 76 OR TAPTR,
  156.       BBA_Screen       = 80 OR TAPTR,
  157.       BBA_DestBitmap   = 84 OR TAPTR,
  158.       BBA_MaskCoords   = 88 OR TAPTR,
  159.       BBA_DirectMasks  = 92 OR TAPTR,
  160.       BBA_AmtFrames    = 96 OR TWORD,
  161.  
  162.       BBA_SourceTags   = TSTEPIN OR TTRIGGER OR 72
  163.  
  164. /***********************************************************************************
  165. ** Multple Bob object.
  166. */
  167.  
  168. CONST MBOBVERSION = 1,
  169.       TAGS_MBOB   = $FFFB0000 OR ID_MBOB
  170.  
  171. OBJECT mbob
  172.    head[1]      :ARRAY OF head    -> Standard header.
  173.    gfxdata      :LONG             -> Pointer to base of BOB graphics.
  174.    maskdata     :LONG             -> Pointer to base of BOB masks.
  175.    framelist    :PTR TO framelist -> Pointer to frame list.
  176.    amtentries   :INT              -> Amount of entries.
  177.    srcwidth     :INT              -> Modulo (skip in source) in bytes.
  178.    width        :INT              -> Width in pixels.
  179.    bytewidth    :INT              -> Width in bytes.
  180.    height       :INT              -> Height in pixels.
  181.    entrylist    :LONG             -> Pointer to entry list.
  182.    clipLX       :INT              -> Left X border in bytes (0/8)
  183.    clipTY       :INT              -> Top Y border (0)
  184.    clipRX       :INT              -> Right X border in bytes (320/8)
  185.    clipBY       :INT              -> Bottom Y border (256)
  186.    fplane       :INT              -> 1st Plane to blit to (planar only)
  187.    planes       :INT              -> Amount of planes
  188.    planesize    :LONG             -> Size Of Plane Source (planar only)
  189.    attrib       :LONG             -> Attributes like CLIP and MASK.
  190.    srcbitmap    :PTR TO bitmap    -> Pointer to a picture struct (bob origin).
  191.    entrysize    :INT              -> Size of each entry in the list.
  192.    srcmaskwidth :INT              -> 
  193.    source       :PTR TO picture   ->
  194.    directgfx    :LONG             -> 
  195.    screen       :PTR TO screen    ->
  196.    destbitmap   :PTR TO bitmap    -> Pointer to Bob's Bitmap.
  197.    maskcoords   :PTR TO framelist -> Pointer to frame list for masks.
  198.    directmasks  :PTR TO LONG      ->
  199.    amtframes    :INT              -> 
  200. ENDOBJECT
  201.  
  202. CONST MBA_GfxData      = 12 OR TAPTR,
  203.       MBA_MaskData     = 16 OR TAPTR,
  204.       MBA_FrameList    = 22 OR TAPTR,
  205.       MBA_AmtEntries   = 20 OR TWORD,
  206.       MBA_SrcWidth     = 26 OR TWORD,
  207.       MBA_Width        = 28 OR TWORD,
  208.       MBA_ByteWidth    = 30 OR TWORD,
  209.       MBA_EntryList    = 32 OR TWORD,
  210.       MBA_Height       = 36 OR TWORD,
  211.       MBA_ClipLX       = 38 OR TWORD,
  212.       MBA_ClipTY       = 40 OR TWORD,
  213.       MBA_ClipRX       = 42 OR TWORD,
  214.       MBA_ClipBY       = 44 OR TWORD,
  215.       MBA_FPlane       = 46 OR TWORD,
  216.       MBA_Planes       = 48 OR TWORD,
  217.       MBA_PropHeight   = 50 OR TWORD,
  218.       MBA_PropWidth    = 52 OR TWORD,
  219.       MBA_Buffers      = 54 OR TWORD,
  220.       MBA_PlaneSize    = 56 OR TLONG,
  221.       MBA_Attrib       = 60 OR TLONG,
  222.       MBA_EntrySize    = 68 OR TWORD,
  223.       MBA_SrcMaskWidth = 70 OR TWORD,
  224.       MBA_Source       = 72 OR TAPTR,
  225.       MBA_DirectList   = 76 OR TAPTR,
  226.       MBA_Screen       = 80 OR TAPTR,
  227.       MBA_DestBitmap   = 84 OR TAPTR,
  228.       MBA_MaskCoords   = 88 OR TAPTR,
  229.       MBA_DirectMasks  = 92 OR TAPTR,
  230.       MBA_AmtFrames    = 96 OR TWORD
  231.  
  232. /**************************************************************************/
  233.  
  234. CONST BBF_CLIP      = $00000001,
  235.       BBF_MASK      = $00000002,
  236.       BBF_STILL     = $00000004,
  237.       BBF_CLEAR     = $00000008,
  238.       BBF_RESTORE   = $00000010,
  239.       BBF_FILLMASK  = $00000040,
  240.       BBF_GENMASK   = $00000082,
  241.       BBF_GENMASKS  = $00000082,
  242.       BBF_CLRMASK   = $00000100,
  243.       BBF_CLRNOMASK = $00000000
  244.  
  245. CONST SKIPIMAGE = 32000,
  246.       SKIPPIXEL = -32000
  247.  
  248.